﻿//---*Authenticity Seal
/*			                                _ .--.
					                       ( `    )
									     .-'      `--,
			                  _..----.. (             )`-.
			                .'_|` _|` _|(  .__,           )
						   /_|  _|  _|  _(        (_,  .-'
			              ;|  _|  _|  _|  '-'__,--'`--'
			              | _|  _|  _|  _| |
			          _   ||  _|  _|  _|  _|
			        _( `--.\_|  _|  _|  _|/
			      .-'       )--,|  _|  _|.`
				(__, (_      ) )_|  _| /
			      `-.__.\ _,--'\|__|__/
			                    ;____;
			                     \  /
								  OO
			                     |""|
			                     '=='
			                     
           			 Autor: Federico Angel Donnet
*/
//---*Authenticity Seal
using UnityEngine;
using System.Collections;

public class CoinItemScript : MonoBehaviour 
{

	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}

	void OnTriggerEnter2D(Collider2D other) 
	{

		if(other.gameObject.tag == "Player")
		{
			this.gameObject.SetActive(false);
			SoundFactoyControllerScript.getInstance().PlayRandomSound2D("CoinPackage");
			EmitterFactoryControllerScript.getInstance().PlayEmitter("CoinEmitter",this.gameObject.transform.position);
		}
	}

	/*
	//---*Callback que se llama al ser "tocado" por el player:
	public	void onCollide()
	{
		this.gameObject.SetActive(false);
		SoundFactoyControllerScript.getInstance().PlayRandomSound2D("CoinPackage");
		EmitterFactoryControllerScript.getInstance().PlayEmitter("CoinEmitter",this.gameObject.transform.position);

	}
	*/
}
